package com.charmzenus.champion.presenter.activity;

import android.util.Log;

import com.charmzenus.champion.base.BasePresenter;
import com.charmzenus.champion.base.net.CallbackAdapter;
import com.charmzenus.champion.base.net.ErrorInfo;
import com.charmzenus.champion.base.net.ResponseInfo;
import com.charmzenus.champion.model.net.HomeInfo;
import com.charmzenus.champion.ui.activity.MainActivity;
import com.charmzenus.champion.utils.LogUtil;
import com.charmzenus.champion.utils.ToastUtil;
import com.charmzenus.champion.utils.UIUtils;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * Created by a1899 on 2018/4/24.
 */

public class MainActivityPresenter extends BasePresenter {

    public MainActivity mainActivity;

    public MainActivityPresenter(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
    }


    public void homeData() {
        Call<HomeInfo> homeInfoCall = responseInfoAPI.homeData();

        CallbackAdapter<HomeInfo> adapter = new CallbackAdapter<>(new CallbackAdapter.CallbackResponse<HomeInfo>() {
            @Override
            public void success(HomeInfo info) {
            }

            @Override
            public void error(HomeInfo info) {
            }

            @Override
            public void netError(ErrorInfo info) {
            }
        });
        homeInfoCall.enqueue(adapter);
    }
}
